<template>
  <div class="container contract-review pb70">
    <p class="bread">
      <a href="#/lawyer-center/lawyer-order">订单管理</a>
    </p>
    <div class="bg-c-fff box-border">
      <h3 class="tm-title">法律服务</h3>
      <step :stepData="stepData" :stepNum="stepNum" @stepRouter="stepRouter"></step>
    </div>
    <div class="content">
      <div class="box bg-c-fff box-border">
        <img src="../assets/sh.png" alt="" class="db auto">
        <p class="tc">恭喜您，法律服务监控已完成。
          <br>可点击顶部操作步骤按钮返回查看之前的文件资料。</p>
      </div>
    </div>
  </div>
</template>
<script type="text/javascript">
import Step from '../components/Step'
export default {
  components: {
    Step
  },
  data() {
    return {
      stepNum: 4,
      stepData: [{
        name: '创建新订单'
      }, {
        name: '客户确认'
      }, {
        name: '监控员绘制流程图'
      }, {
        name: '法律服务监控'
      }, {
        name: '服务完成'
      }],
      status: ''
    }
  },
  mounted() {
    if (this.$route.query.id) {
      this.$http.get('/legalService/read/detail', {
        params: {
          id: this.$route.query.id
        }
      }).then(data => {
        if (data.data.httpCode === 200) {
          this.status = data.data.data.status
        } else {
          this.$toasted.show(data.data.msg)
        }
      }).catch(err => {
        console.log(err)
        this.$toasted.show('网络出错')
      })
    }
  },
  methods: {
    stepRouter(i, name) {
      if (i === 0 && this.status >= 1) {
        this.$router.push('/lawyer-establish?id=' + this.$route.query.id)
      }
      if (i === 1 && this.status >= 1) {
        this.$router.push('/lawyer-customert-confirm?id=' + this.$route.query.id)
      }
      if (i === 2 && this.status >= 2) {
        this.$router.push('/lawyer-mapping?id=' + this.$route.query.id)
      }
      if (i === 3 && this.status >= 3) {
        this.$router.push('/lawyer-monitor?id=' + this.$route.query.id)
      }
      if (i === 4 && this.status >= 4) {
        this.$router.push('/lawyer-finish?id=' + this.$route.query.id)
      }
    }
  }
}

</script>
<style type="text/css" scoped>
.box-border {
  border: 1px solid #ddd;
}

.tm-title {
  line-height: 40px;
  padding-left: 35px;
  font-size: 14px;
  color: #282828;
  border-bottom: 1px solid #ddd;
}

.content .box {
  margin-top: 20px;
  padding: 80px 0;
}

.content .box p {
  margin-top: 30px;
  color: #666;
  line-height: 30px;
}















































































/*

.white-button,
.blue-button {
  width: 245px;
  height: 40px;
  line-height: 40px;
  text-align: center;
  margin: 25px 5px 45px 5px;
}

.file-box {
  height: 300px;
  width: 600px;
  margin-top: 40px;
  padding-top: 125px;
}

.state {
  line-height: 35px;
}*/

</style>
